package cn.com.dycc.sys_manage.dictionarysysmanagement.service;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import cn.com.dycc.sys_manage.dictionarysysmanagement.entity.Dictionary;
import cn.com.dycc.sys_manage.dictionarysysmanagement.entity.DictionaryResult;
import cn.com.dycc.sys_manage.dictionarysysmanagement.param.DicParam;



/**
 * 
 * Description: 字典表service层
 * Author: Liket
 * Version: 1.0
 * Create Date Time: 2017年8月16日 下午3:59:16.
 * Update Date Time: 
 * @see
 */
public interface DictionaryService {
	/**
	 * 查询字典表所有信息 ;模糊查询
	 * @param key 名称
	 * @param val 值
	 * @param tab_name 表名
	 * @param column_name 字段名
	 * @return 字典表集合
	 */
	List<DictionaryResult> findAllDict(String org_id,DicParam dicParam)throws DictNotFoundException;
	/**
	 * 批量删除字典表
	 * @param ids 字典表数组id
	 * @return 删除成功  删除失败
	 * @throws DictNotFoundException
	 */
	String deleteDictionary(HttpServletRequest req,String []ids)throws DictNotFoundException;
	/**
	 * 增加字典表数据
	 * @param dict 字典表实体类
	 * @return 增加成功 增加失败
	 * @throws DictNotFoundException
	 */
	String addDictionary(Dictionary dict)throws DictNotFoundException;
	/**
	 * 更新字典表
	 * @param dict 字典表实体类
	 * @return 更新成功 更新失败
	 * @throws DictNotFoundException
	 */
	String updateDictionary(Dictionary dict)throws DictNotFoundException;
	

	/**
	 * 用于查询精确查询字典表集合
	 * @param key 名称
	 * @param val 值
	 * @param tab_name 表名
	 * @param column_name 字段名
	 * @return 字典表集合
	 */
	List<DictionaryResult> dicList(String org_id,DicParam dicParam)throws DictNotFoundException;
	
	String countDict(String org_id,DicParam dicParam)throws DictNotFoundException;
	
	/**
	 * 查询字典表数据keyandval
	 * @param request
	 * @param tab_name
	 * @param column_name HttpServletRequest request,
	 * @return
	 * @throws DictNotFoundException
	 */
	public List<Map<String,Object>> findKeyAndVal(HttpServletRequest request,String tab_name,String column_name)throws DictNotFoundException;
	
	Dictionary findDictionary(String id,HttpServletRequest request)throws DictNotFoundException;
	
}
